﻿<%@ Page Language="C#" MasterPageFile="~/Game/Game.Master" AutoEventWireup="true" CodeBehind="PlayerInfo.aspx.cs" Inherits="smallDeimos.Game.PlayerInfo" Title="Small Deimos - player info" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table>
<tr><th class="style5">General data</th><th class="style6">Inteligence report</th></tr>
<tr><td class="style5" valign="top">
    <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1">
        <ItemTemplate>
        <table><tr><td>
            Player Name:</td><td>
            <asp:Label ID="PlayerNameLabel" runat="server" 
                Text='<%# Eval("PlayerName") %>' /></td>
            </tr><tr><td>
            Player level(exp):</td><td>
            <asp:Label ID="ExpPointsLabel" runat="server" Text='<%# ExpLevel(Eval("ExpPoints")) %>' />
            </td></tr><tr><td>
            OrginID:</td><td>
            <asp:Label ID="OrginIDLabel" runat="server" Text='<%# Eval("OrginID") %>' /></td></tr>
            <tr><td>
            Current Culture:</td><td>
            <asp:Label ID="CurrentCultureLabel" runat="server" 
                Text='<%# Eval("CurrentCulture", " {0:F3}") %>' /></td></tr>
            </table>
            <br />
        </ItemTemplate>
    </asp:DataList>
    <asp:LinkButton ID="LinkButton1" runat="server">Battles</asp:LinkButton>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:smallDeimosConnectionString %>" 
        SelectCommand="SELECT PlayerName, ExpPoints, OrginID, CurrentCulture FROM Players WHERE (PlayerId = @pId)">
        <SelectParameters>
            <asp:QueryStringParameter Name="pId" QueryStringField="pId" />
        </SelectParameters>
    </asp:SqlDataSource>
    </td><td class="style6" valign="top">
        <asp:DataList ID="DataList2" runat="server" DataSourceID="SqlDataSource2">
            <ItemTemplate>
            <table><tr><td>
                Attack:</td><td>
                <asp:Label ID="AttackLabel" runat="server" Text='<%# Eval("Attack") %>' /></td>
                </tr><tr><td>
                Defense:</td><td>
                <asp:Label ID="DefenseLabel" runat="server" Text='<%# Eval("Defense") %>' /></td>
                </tr><tr><td>
                Speed:</td><td>
                <asp:Label ID="SpeedLabel" runat="server" Text='<%# Eval("Speed") %>' />
                </td></tr><tr><td>
                Culture:</td><td>
                <asp:Label ID="CultureLabel" runat="server" Text='<%# Eval("Culture") %>' /></td>
                </tr><tr><td>
                Production:</td><td>
                <asp:Label ID="ProductionLabel" runat="server" 
                    Text='<%# Eval("Production") %>' /></td>
                </tr><tr><td>
                Science:</td><td>
                <asp:Label ID="ScienceLabel" runat="server" Text='<%# Eval("Science") %>' />
                </td></tr><tr><td>
                Growth:</td><td>
                <asp:Label ID="GrowthLabel" runat="server" Text='<%# Eval("Growth") %>' />
                </tr><tr><td>
                Biology:</td><td>
                <asp:Label ID="BiologyLabel" runat="server" Text='<%# Eval("Biology", " {0:F3}") %>' />
                </tr><tr><td>
                Economy:</td><td>
                <asp:Label ID="EconomyLabel" runat="server" Text='<%# Eval("Economy", " {0:F3}") %>' />
                </tr><tr><td>
                Energy:</td><td>
                <asp:Label ID="EnergyLabel" runat="server" Text='<%# Eval("Energy", " {0:F3}") %>' />
                </tr><tr><td>
                Math:</td><td>
                <asp:Label ID="MathLabel" runat="server" Text='<%# Eval("Math", " {0:F3}") %>' />
                </tr><tr><td>
                Physics:</td><td>
                <asp:Label ID="PhysicsLabel" runat="server" Text='<%# Eval("Physics", " {0:F3}") %>' />
                </tr><tr><td>
                Social:</td><td>
                <asp:Label ID="SocialLabel" runat="server" Text='<%# Eval("Social", " {0:F3}") %>' />
                </td></tr>
                </table>
            </ItemTemplate>
        </asp:DataList>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:smallDeimosConnectionString %>" 
            SelectCommand="SELECT Attack, Defense, Speed, Culture, Production, Science, Growth, Biology, Economy, Energy, Math, Physics, Social FROM Players WHERE (PlayerId = @pId) AND (@pId = @activePlayer) OR (PlayerId = @pId) AND ((SELECT Biology FROM Players AS Players_1 WHERE (PlayerId = @activePlayer)) &gt;= Biology + (6 -
                          (SELECT     Academy
                            FROM          Players AS Players_2
                            WHERE      (PlayerId = @activePlayer))))">
            <SelectParameters>
                <asp:QueryStringParameter Name="pId" QueryStringField="pId" />
                <asp:CookieParameter CookieName="sd_id" Name="activePlayer" />
            </SelectParameters>
        </asp:SqlDataSource>
    </td></tr>
</table>
</asp:Content>
<asp:Content ID="Content3" runat="server" contentplaceholderid="head">

    <style type="text/css">
        .style5
        {
            width: 180px;
        }
        .style6
        {
            width: 300px;
        }
    </style>

</asp:Content>

